package com.lagou.dubbo.controller;

import com.lagou.dubbo.service.DubboBService;
import com.lagou.dubbo.service.DubboCService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/ip")
public class IPController {

    @Reference(check = false, filter = "TransportIPFilter")
    private DubboBService dubboBService;

    @Reference(check = false, filter = "TransportIPFilter")
    private DubboCService dubboCService;

    @GetMapping
    public void ip() {
        dubboBService.printIP();
        dubboCService.printIP();
    }
}
